<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
     <%@ taglib  uri="/WEB-INF/tlds/authorizetag.tld" prefix="px"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
<!-- Bootstrap core CSS -->
<link href="/admin/public/bootstrap.min.css" title="" rel="stylesheet" />
<link rel="stylesheet" href="/admin/css/plugins/toastr/toastr.min.css" />
<link href="/admin/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="/admin/public/animate.css" rel="stylesheet">
<link rel="stylesheet" href="/admin/public/inspinia.css" />
<link rel="stylesheet" href="/admin/css/templet_form.css" />
<link rel="stylesheet" type="text/css" href="${request.getContext }/admin/css/xcConfirm.css"/>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
	<script src="/admin/public/html5shiv.min.js"></script>
	<script src="/admin/public/respond.min.js"></script>
<![endif]-->
<style>
/*
	设置按钮里面字体的颜色
*/
table a {
    color: white !important;
}
/* 
	表格样式水平居中
*/
table tr th{
	text-align:center;
}
table tr td{
	vertical-align: middle !important;
	text-align:center;
}
</style>

<title>积分记录</title>
</head>
<body>
	<div id="wrapper" class="container">
			<!--标编辑-->
			<div id="biaobj" class=" wrapper wrapper-content animated fadeInRight">
				<h3>上课记录</h3>
				<div class="right_box" id="right_box">
					<form action="/admin/Member/selShangKe" class="form-horizontal">
					<input type="hidden" name="userId" value="${userId }">
						<div class="form-group">
						<label class="col-lg-1 col-md-1 col-sm-1 control-label" for="">
							教练姓名：</label>
						<div
							class="col-lg-2 col-md-2 col-sm-2 chosen-container chosen-container-single">
							<input type="text" class="form-control" name="jiaolian" id="jiaolian"
								value="${jiaolian }" />
						</div>
							<label class="col-lg-1 col-md-1 col-sm-1 control-label" for="">
							课程类型：</label>
						<div
							class="col-lg-2 col-md-2 col-sm-2 chosen-container chosen-container-single">
							<select class="select2_demo_1 form-control" name="coursesType"
								id="coursesType">
								<option value="">--请选择--</option>
								<option value="0" ${coursesType=='0'?'selected':'' }>团课</option>
								<option value="1" ${coursesType=='1'?'selected':'' }>私教</option>
								<option value="2" ${coursesType=='2'?'selected':'' }>训练营</option>
							</select>
						</div>
							
							<div style="width:530px;float:left;">
			            		<label for="" class="control-label" style="width:120px;float:left;">训练时间：</label>
			            		<img style="position: relative;left:-29px; top: 6px" src="/admin/img/datePicker.gif"/>
			            			<input type="text" placeholder="开始时间" style="width:175px;float:left;" id="startTime" name="startTime" value="${startTime }" class= "form-control" onFocus="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd'})" /><img style="position: relative;left:-260px; top: 6px" src="/admin/img/datePicker.gif"/>
			            			<span style="float:left; margin-top: 5px">——</span>
			            			<input type="text" placeholder="结束时间" style="width:175px;float:left; margin-left: 3px" id="endTime" name="endTime" value="${endTime }" class="form-control" onFocus="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd'})" />
			            		</div>
							<input style="width:82px;height:34px;" type="submit" value="搜索" class="col-lg-3 btn btn-success" />
							<input type="button" style="width:82px;height:34px; margin-left: 12px" onclick="fh('${userName}','${telenumber }');" value="返回"  class="btn btn-success"/>
						</div>
					</form>

					<!--表格部分-->
					<div class="ibox-content">
						<div class="row">
							<div class="col-sm-12">
								<table class="table table-striped table-bordered table-hover dataTables-example">
									<thead>
										<tr>
											<th>姓名</th>
											<th>电话</th>
											<th>课程名称</th>
											<th>教练姓名</th>
											<th>课程类型</th>
											<th>训练开始时间</th>
											<th>训练结束时间</th>
										</tr>
									</thead>
									<tbody>
										<c:forEach items="${list }" var="list">
										<tr>
											<td>${list.realname }</td>
											<td>${list.telenumber }</td>
											<td>${list.coursesName }</td>
											<td>${list.jiaolian }</td>
											<td>
												<c:if test="${list.coursesType==0 }">团课</c:if>
												<c:if test="${list.coursesType==1 }">私教</c:if>
												<c:if test="${list.coursesType==2 }">训练营</c:if>
											</td>
											<td><fmt:formatDate type="time" value="${list.startTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
											<td><fmt:formatDate type="time" value="${list.endTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
						<div class="row">
							<form action="" id="for" name="for" method="post">
								<input type="hidden" name="yehao" id="yin" value="1"> <input
									type="hidden" name="pagesize" id="tiaoshu"
									value="${page.pageSize }">
								<div class="fy">
									<span style="float: left;">每页条数：</span> <select
										style="width: 70px; float: left;"
										onchange="changeItem(this.value)" id="pagesize"
										name="pageSize">
										<option value="10" ${page.pageSize==10?'selected':'' }>10</option>
										<option value="20" ${page.pageSize==20?'selected':'' }>20</option>
										<option value="50" ${page.pageSize==50?'selected':'' }>50</option>
										<option value="100" ${page.pageSize==100?'selected':'' }>100</option>
										<option value="200" ${page.pageSize==200?'selected':'' }>200</option>
									</select>
									<div style="height: 27px;" class="col-sm-7">
										<div class="dataTables_paginate paging_simple_numbers"
											id="editable_paginate">
											<ul class="pagination pull-right" style="margin: -3px 0;">
												<li class="paginate_button previous" id="editable_previous">
													<a href="javascript:han(${page.pageNow-1 })"
													aria-controls="editable" data-dt-idx="0" tabindex="0">上一页</a>
												</li>
												<li class="paginate_button previous" id="editable_previous">
													<a aria-controls="editable" style="border: 0"
													data-dt-idx="0" tabindex="1"><input type="text"
														id="current"
														style="width: 32px; height: 19px; text-align: center;"
														value="${page.totalPageCount==0?0:page.pageNow}" /> /
														${page.totalPageCount }</a>
												</li>
												<li class="paginate_button previous" id="editable_previous">
													<a href="javascript:han(${page.pageNow+1 })"
													aria-controls="editable" data-dt-idx="0" tabindex="5">下一页</a>
													<a href="javascript:han($('#current').val())"
													aria-controls="editable" data-dt-idx="0" tabindex="5">跳转</a>
												</li>
											</ul>
										</div>
									</div>
									<div style="float: right;">总共${page.totalCount }条</div>
								</div>

							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- <iframe id="ifr" src="r_swiper.html" frameborder="no" scrolling="no" width="780px" height="100%" allowtransparency="true"></iframe> -->
		<script src="/admin/public/jquery-1.11.3.js"></script>
		<script src="/admin/public/bootstrap.min.js" type="text/javascript"></script>
		<script src="/admin/js/plugins/lhgdialog/lhgdialog.js"></script>
		<script src="${request.getContextPath }/admin/My97/WdatePicker.js"></script>
		<!-- 弹出警示框 -->
		<script src="/admin/js/plugins/toastr/toastr.min.js"></script>
		<!-- 弹出确认框 -->
		<script src="/admin/public/artDialog4.1.7/artDialog.js?skin=blue"></script>
    	<script src="/admin/public/artDialog4.1.7/plugins/iframeTools.js"></script>
    	
    	<script src="/admin/js/templet_form.js"></script>
    	<script src="${request.getContext }/admin/js/xcConfirm.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    	function changeNumber(num){
    		document.getElementById("yin").value=num;
    		var biao=document.getElementById("for");
    		biao.submit();
    	}
    	function changeItem(size) {
    		document.getElementById("tiaoshu").value=size;
    		var biao=document.getElementById("for");
    		biao.submit();
    	 }
    	function han(pn){
    		var yeshu=eval(${page.totalPageCount});
    		if(pn>0){
    			document.getElementById("yin").value=pn;
    		}else{
    			document.getElementById("yin").value=1;
    		}
    		if(document.getElementById("yin").value>yeshu){
    			document.getElementById("yin").value=yeshu;
    		}
    		var biao=document.getElementById("for");
    		/* document.for.action="bookInfoList?bookType="+document.all.bookType.value+"&bookName="+document.all.bookName.value; */
    		biao.submit();
    	}
    	//添加会员
    	function addMember() {
			$.dialog({
				title : '添加会员',
				width : 700,
				height : 280,
				content : 'url:/admin/Member/toadd',
				init : function() {
				var iframe = this.iframe.contentWindow;
				var ul = iframe.document.getElementById('');
			},
			button : [
				{
					name : '保存',
					callback : function() {
					var iframe = this.iframe.contentWindow;
					var btn = iframe.document.getElementById('btnn').click();
					if (btn == true) {
					} else {
						if (iframe.document.getElementById('').value == 1) {
							window.location.href = "/admin/Member/addMe";
						}
						return false;
						}
						},
						focus : true

						}, {
						name : '取消',
						callback : function() {

						}
						} ]
			});
		}
    	//删除会员
    	function del(userId){
			window.wxc.xcConfirm("确定要删除吗？", window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){ 
	  			$.post("/admin/Member/delete",{"userId":userId},
	  			function(data){
	  				window.wxc.xcConfirm(data.msg, window.wxc.xcConfirm.typeEnum.info,
							{onOk:function(){window.location.href="/admin/Member/mlist";}}
					)
	  			});
	  		}})
		}
    	//冻结账户
    	function frozen(userId){
			window.wxc.xcConfirm("确定要取消冻结吗？", window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){ 
	  			$.post("/admin/Member/frozen",{"userId":userId},
	  			function(data){
	  				window.wxc.xcConfirm(data.msg, window.wxc.xcConfirm.typeEnum.info,
							{onOk:function(){window.location.href="/admin/Member/mlist";}}
					)
	  			});
	  		}})
		}
    	//查看个人积分记录
    	function selJiFen(userId){
    		window.location.href="/admin/Member/selJiFen?userId="+userId;
    	}
    	//返回
		function fh(userName,telenumber){
			window.location.href="/admin/Member/mlist?userName="+userName+"&telenumber="+telenumber;
		}
    	
    	
</script>
    	
</body>
</html>
